Modify attribute type

Hello,

How can I modify the attribute type? I had created an attributes of type "text" but I need to change it to "Enum" type. Other than creating a new attributes of enum type and copying the data to it, is there any trick to change it.

Thanks a lot.

Regards,

Pana


JayashreePana - Thu Aug 11 06:52:37 EDT 2016

Re: Modify attribute type
Wolfgang Uhr - Thu Aug 11 07:13:15 EDT 2016

No that is impossible. You have to create a new attribute and then to copy the data.
 

Re: Modify attribute type
JayashreePana - Thu Aug 11 07:17:38 EDT 2016

Wolfgang Uhr - Thu Aug 11 07:13:15 EDT 2016

No that is impossible. You have to create a new attribute and then to copy the data.
 

Hello Wolfgang,

May I know the reason? What is the technical problem?

Rgs,

Pana

Re: Modify attribute type
DOORSHAM - Thu Aug 11 10:51:03 EDT 2016

JayashreePana - Thu Aug 11 07:17:38 EDT 2016

Hello Wolfgang,

May I know the reason? What is the technical problem?

Rgs,

Pana

Technical problem is that DOORS can't do what you ask -- if you want to dig deeper; suggest you contact IBM with your issue.

Re: Modify attribute type
Antonio__Norkus - Thu Aug 11 11:44:48 EDT 2016

JayashreePana - Thu Aug 11 07:17:38 EDT 2016

Hello Wolfgang,

May I know the reason? What is the technical problem?

Rgs,

Pana

The technical problem is a matter of the migration of attribute Values due to a change in attribute Type.
Example:
Attribute A is of type String.

Attribute A of Object 1 has the value "A string of info"
If we change attribute A to type Integer, what do we do with the value "A string of info"?

I believe that DOORS prevents the change of type of an attribute to avoid this "value migration problem". Instead, they leave it as an exercise for the User.

Re: Modify attribute type
thsturm - Fri Aug 12 02:51:04 EDT 2016

- create a temp attribute [enum]

- copy the value of the existing attribute [string] to the temp attribute [enum] (what to do, if the existing value is not an enum value?)

- delete the existing attribute [string]

- rename the temp attribute to the name of the (deleted) existing attribute name

See attached file for an example.


Attachments

CopyStringToEnum.dxl

Re: Modify attribute type
JayashreePana - Fri Aug 12 03:44:06 EDT 2016

Antonio__Norkus - Thu Aug 11 11:44:48 EDT 2016

The technical problem is a matter of the migration of attribute Values due to a change in attribute Type.
Example:
Attribute A is of type String.

Attribute A of Object 1 has the value "A string of info"
If we change attribute A to type Integer, what do we do with the value "A string of info"?

I believe that DOORS prevents the change of type of an attribute to avoid this "value migration problem". Instead, they leave it as an exercise for the User.

Hi,

I was thinking we are automating so many things and how come such a small modification is "impossible". If the datatype does not just leave it blank!.

However I have starting problem I mean not getting how start with.

Thanks a lot for your valuable time.

Regards,

Pana.

Re: Modify attribute type
Mike.Scharnow - Fri Aug 12 04:54:56 EDT 2016

JayashreePana - Fri Aug 12 03:44:06 EDT 2016

Hi,

I was thinking we are automating so many things and how come such a small modification is "impossible". If the datatype does not just leave it blank!.

However I have starting problem I mean not getting how start with.

Thanks a lot for your valuable time.

Regards,

Pana.

just a remark: such a "small" modification is not possible for many database-like programs. Even in Oracle it is not possible to convert data type from string to integer so easily, and enums are stored as integer.

Re: Modify attribute type
Wolfgang Uhr - Fri Aug 12 09:01:50 EDT 2016

JayashreePana - Thu Aug 11 07:17:38 EDT 2016

Hello Wolfgang,

May I know the reason? What is the technical problem?

Rgs,

Pana

There is no technical problem. Doors does not have a technical solution for this.

Re: Modify attribute type
DOORSHAM - Fri Aug 12 18:55:35 EDT 2016

Wolfgang Uhr - Fri Aug 12 09:01:50 EDT 2016

There is no technical problem. Doors does not have a technical solution for this.

good answer -- you worded it much better than I did.

Re: Modify attribute type
JayashreePana - Thu Aug 18 09:03:15 EDT 2016

DOORSHAM - Fri Aug 12 18:55:35 EDT 2016

good answer -- you worded it much better than I did.

Hi,

I found a very good DXL script from DXL library which does the fantastic job. With this you can modify the attribute type. Check the attached screen shot.

Regards,

Pana.

 


Attachments

Modify the attribute type.docx